package com.boboPlanet.user.controller;

import com.boboPlanet.comm.entity.po.LoginDetailInfoPO;
import com.boboPlanet.comm.result.ResponseResult;
import com.boboPlanet.user.service.UserResumeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @Description: TODO 简历信息
 * @Author: mis_wu
 * @Date: 2023/3/13
 **/
@RestController
@RequestMapping("/userResume")
public class UserResumeController {

    @Resource
    private UserResumeService userResumeService;

    @PostMapping("/uploadResumeAvatar")
    @ApiOperation("spring-x-file-storage 上传简历头像")
    public ResponseResult<String> uploadResumeAvatar(@RequestParam("file") MultipartFile file){
        return ResponseResult.isSuccess(userResumeService.uploadResumeAvatar(file));
    }

    @ApiOperation("获取简历基本信息")
    @GetMapping("/getResumeBaseInfo")
    public ResponseResult<LoginDetailInfoPO> getResumeBaseInfo(){
        return ResponseResult.isSuccess(userResumeService.getResumeBaseInfo());
    }
}
